import request from '@/utils/request'

export default {
    //通过小节id获取小节信息
    getVideoInfo(id){
        return request({
            url: '/eduservice/video/getVideoInfo/' + id,
            method: 'get',
        })
    },
    //添加小节
    addVideo(video){
        return request({
            url: '/eduservice/video/addVideo',
            method: 'post',
            data: video
        })
    },
    //修改小节
    updateVideo(video){
        return request({
            url: '/eduservice/video/updateVideo',
            method: 'post',
            data: video
        })
    },
    //删除小节
    deleteVideo(videoId){
        return request({
            url: '/eduservice/video/deleteVideo/' + videoId,
            method: 'delete'
        })
    },
    //更新视频id(video_source_id)和视频名字(video_original_name)
    //只修改部分字段的值，使用put
    updateSourceIdAndName(id){
        return request({
            url: '/eduservice/video/updateSourceIdAndName/' + id,
            method: 'put'
        })
    }    
}